<%@page import="entities.SiteConfig"%>
<%@page import="java.util.TreeMap"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.ArrayList"%>
<%
	TreeMap check = (TreeMap) request.getAttribute("check");
	TreeMap values = (TreeMap) request.getAttribute("values");
	String success = (String) request.getAttribute("success");
	SiteConfig siteConfig = (SiteConfig) request.getAttribute("config");
	String image = UrlHelper.getServerUrl(request) + "/blobstore-serve?blob-key=" + siteConfig.getLogo();
%>


<jsp:include page="/demo/layouts/header.jsp">
    <jsp:param name="title" value="<%=siteConfig.getTitle()%>" />
    <jsp:param name="description" value="<%=siteConfig.getMetaDescription()%>" />
    <jsp:param name="keywords" value="<%=siteConfig.getMetaKeywords()%>" />
    <jsp:param name="ogsite_name" value="<%=siteConfig.getSiteName()%>" />
    <jsp:param name="ogtitle" value="<%=siteConfig.getTitle()%>" />
    <jsp:param name="ogurl" value="<%=UrlHelper.getServerUrl(request)%>" />
    <jsp:param name="ogimage" value="<%=image %>" />
    <jsp:param name="ogdescription" value="<%=siteConfig.getMetaDescription()%>" />
</jsp:include>

		<div class="dir">
			<a href="/home">Home</a> > Contact Us
		</div>
		
		<br />
		<div class="submit-form">
			<form action="" method="post">
			<jsp:include page="/demo/elements/message.jsp" />
			<table width="100%" cellpadding="0" cellspacing="0">
				<thead>
					<tr>
						<td colspan="2"><div class="title-form">Contact Us</div></td>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td width="30%" class="name">
							Your name
						</td>
						<td>
							<input type="text" name="name" value="<%=values.get("name") != null ? values.get("name") : "" %>">
							<br />
							<% if (check.get("name") != null ) { %>
							<span class="error"><%=check.get("name") %></span>
							<% } %>
						</td>
					</tr>
					<tr>
						<td>
							Your email
						</td>
						<td>
							<input type="text" name="email" value="<%=values.get("email") != null ? values.get("email") : "" %>">
							<br />
							<% if (check.get("email") != null ) { %>
							<span class="error"><%=check.get("email") %></span>
							<% } %>
						</td>
					</tr>
					<tr>
						<td>
							Message
						</td>
						<td>
							<textarea rows="5" cols="40" name="content" ><%=values.get("content") != null ? values.get("content") : "" %></textarea>
							<br />
							<% if (check.get("content") != null ) { %>
							<span class="error"><%=check.get("content") %></span>
							<% } %>
						</td>
					</tr>
					<tr>
						<td>ReCaptcha</td>
						<td>
							<div >
							<% if (check.get("captcha") != null) { %>
								<div class="error"><%=check.get("captcha")%></div>
							<% } %>
							<script>
					        	var RecaptchaOptions = { theme : 'clean' };
					  		</script>
							<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=6LeA0c4SAAAAAMsdjrB49GPol6XImTdJM2U2AHrF"></script>
							</div>
						</td>
					</tr>
				</tbody>
				<tfoot>
					<tr>
						<td></td>
						<td>
							<button type="submit">Send</button>
						</td>
					</tr>
				</tfoot>
			</table>
			</form>
		</div>

<jsp:include page="/demo/layouts/footer.jsp">
    <jsp:param name="language" value="1" />
</jsp:include>